3.1.9 \(\int \frac {\csc ^3(x)}{a-a \cos ^2(x)} \, dx\) [9]

Optimal. Leaf size=35 \[ -\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {3 \cot (x) \csc (x)}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a} \]

[Out]

-3/8*arctanh(cos(x))/a-3/8*cot(x)*csc(x)/a-1/4*cot(x)*csc(x)^3/a

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3254, 3853, 3855} \begin {gather*} -\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a}-\frac {3 \cot (x) \csc (x)}{8 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[x]^3/(a - a*Cos[x]^2),x]

[Out]

(-3*ArcTanh[Cos[x]])/(8*a) - (3*Cot[x]*Csc[x])/(8*a) - (Cot[x]*Csc[x]^3)/(4*a)

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\csc ^3(x)}{a-a \cos ^2(x)} \, dx &=\frac {\int \csc ^5(x) \, dx}{a}\\ &=-\frac {\cot (x) \csc ^3(x)}{4 a}+\frac {3 \int \csc ^3(x) \, dx}{4 a}\\ &=-\frac {3 \cot (x) \csc (x)}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a}+\frac {3 \int \csc (x) \, dx}{8 a}\\ &=-\frac {3 \tanh ^{-1}(\cos (x))}{8 a}-\frac {3 \cot (x) \csc (x)}{8 a}-\frac {\cot (x) \csc ^3(x)}{4 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(75\) vs. \(2(35)=70\).
time = 0.01, size = 75, normalized size = 2.14 \begin {gather*} \frac {-\frac {3}{32} \csc ^2\left (\frac {x}{2}\right )-\frac {1}{64} \csc ^4\left (\frac {x}{2}\right )-\frac {3}{8} \log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {3}{8} \log \left (\sin \left (\frac {x}{2}\right )\right )+\frac {3}{32} \sec ^2\left (\frac {x}{2}\right )+\frac {1}{64} \sec ^4\left (\frac {x}{2}\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^3/(a - a*Cos[x]^2),x]

[Out]

((-3*Csc[x/2]^2)/32 - Csc[x/2]^4/64 - (3*Log[Cos[x/2]])/8 + (3*Log[Sin[x/2]])/8 + (3*Sec[x/2]^2)/32 + Sec[x/2]
^4/64)/a

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 52, normalized size = 1.49

method result size
default \(\frac {\frac {1}{16 \left (\cos \left (x \right )+1\right )^{2}}+\frac {3}{16 \left (\cos \left (x \right )+1\right )}-\frac {3 \ln \left (\cos \left (x \right )+1\right )}{16}-\frac {1}{16 \left (-1+\cos \left (x \right )\right )^{2}}+\frac {3}{16 \left (-1+\cos \left (x \right )\right )}+\frac {3 \ln \left (-1+\cos \left (x \right )\right )}{16}}{a}\) \(52\)
norman \(\frac {-\frac {1}{64 a}-\frac {\tan ^{2}\left (\frac {x}{2}\right )}{8 a}+\frac {\tan ^{6}\left (\frac {x}{2}\right )}{8 a}+\frac {\tan ^{8}\left (\frac {x}{2}\right )}{64 a}}{\tan \left (\frac {x}{2}\right )^{4}}+\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{8 a}\) \(58\)
risch \(\frac {3 \,{\mathrm e}^{7 i x}-11 \,{\mathrm e}^{5 i x}-11 \,{\mathrm e}^{3 i x}+3 \,{\mathrm e}^{i x}}{4 \left ({\mathrm e}^{2 i x}-1\right )^{4} a}+\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{8 a}-\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{8 a}\) \(71\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^3/(a-a*cos(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/a*(1/16/(cos(x)+1)^2+3/16/(cos(x)+1)-3/16*ln(cos(x)+1)-1/16/(-1+cos(x))^2+3/16/(-1+cos(x))+3/16*ln(-1+cos(x)
))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 51, normalized size = 1.46 \begin {gather*} \frac {3 \, \cos \left (x\right )^{3} - 5 \, \cos \left (x\right )}{8 \, {\left (a \cos \left (x\right )^{4} - 2 \, a \cos \left (x\right )^{2} + a\right )}} - \frac {3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {3 \, \log \left (\cos \left (x\right ) - 1\right )}{16 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a-a*cos(x)^2),x, algorithm="maxima")

[Out]

1/8*(3*cos(x)^3 - 5*cos(x))/(a*cos(x)^4 - 2*a*cos(x)^2 + a) - 3/16*log(cos(x) + 1)/a + 3/16*log(cos(x) - 1)/a

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (29) = 58\).
time = 0.39, size = 72, normalized size = 2.06 \begin {gather*} \frac {6 \, \cos \left (x\right )^{3} - 3 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 10 \, \cos \left (x\right )}{16 \, {\left (a \cos \left (x\right )^{4} - 2 \, a \cos \left (x\right )^{2} + a\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a-a*cos(x)^2),x, algorithm="fricas")

[Out]

1/16*(6*cos(x)^3 - 3*(cos(x)^4 - 2*cos(x)^2 + 1)*log(1/2*cos(x) + 1/2) + 3*(cos(x)^4 - 2*cos(x)^2 + 1)*log(-1/
2*cos(x) + 1/2) - 10*cos(x))/(a*cos(x)^4 - 2*a*cos(x)^2 + a)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\csc ^{3}{\left (x \right )}}{\cos ^{2}{\left (x \right )} - 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**3/(a-a*cos(x)**2),x)

[Out]

-Integral(csc(x)**3/(cos(x)**2 - 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 47, normalized size = 1.34 \begin {gather*} -\frac {3 \, \log \left (\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {3 \, \log \left (-\cos \left (x\right ) + 1\right )}{16 \, a} + \frac {3 \, \cos \left (x\right )^{3} - 5 \, \cos \left (x\right )}{8 \, {\left (\cos \left (x\right )^{2} - 1\right )}^{2} a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a-a*cos(x)^2),x, algorithm="giac")

[Out]

-3/16*log(cos(x) + 1)/a + 3/16*log(-cos(x) + 1)/a + 1/8*(3*cos(x)^3 - 5*cos(x))/((cos(x)^2 - 1)^2*a)

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 39, normalized size = 1.11 \begin {gather*} -\frac {3\,\mathrm {atanh}\left (\cos \left (x\right )\right )}{8\,a}-\frac {\frac {5\,\cos \left (x\right )}{8}-\frac {3\,{\cos \left (x\right )}^3}{8}}{a\,{\cos \left (x\right )}^4-2\,a\,{\cos \left (x\right )}^2+a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)^3*(a - a*cos(x)^2)),x)

[Out]

- (3*atanh(cos(x)))/(8*a) - ((5*cos(x))/8 - (3*cos(x)^3)/8)/(a - 2*a*cos(x)^2 + a*cos(x)^4)

________________________________________________________________________________________